<?php
// +----------------------------------------------------------------------
// | 商城模块
// +----------------------------------------------------------------------

namespace app\mall\validate;

use think\Validate;

/**
 * 分类验证器
 * @package app\mall\validate
 */
class Category extends Validate
{
    // 定义验证规则
    protected $rule = [
        'title|分类名称'   => 'require|unique:mall_category,title',
		'icon|图标'   => 'requireIf:pid,0',
    ];
}
